import request from '@/utils/request'
import url from 'postcss-url'


//三、医院设置相关api调用接口
export default{
  //1.获取医院设置列表
  getList(current,limit,hospObj){
    return request({
      url: `/admin/hosp/hospitalSet/findPageHospitalSet/${current}/${limit}`,
      method: 'post',
      data:hospObj  //使用json转
    })
  },

  //2.删除医院设置
  deleteHospSetById(id){
    return request({
      url:  `/admin/hosp/hospitalSet/${id}`,
      method: 'delete'
    })
  },

  //3.批量删除医院设置
  deleteBatchByIds(idList){
    return request({
      url: `/admin/hosp/hospitalSet/deleteBatchById`,
      method: 'delete',
      data: idList
    })
  },

  //4.改变医院状态
  updateStatus(id,status){
    return request({
      url:`/admin/hosp/hospitalSet/updateStatus/${id}/${status}`,
      method: 'put',
    })
  },

  //5.添加医院设置
  saveHospitalSet(hospitalSet){
    return request({
      url: `/admin/hosp/hospitalSet/saveHospitalSet`,
      method: 'post',
      data: hospitalSet
    })
  },

  //6.更改医院设置
  //6.1、根据id获取医院设置
  getHospSetById(id){
    return request({
      url:`/admin/hosp/hospitalSet/getHospById/${id}`,
      method:'get',
    })
  },
  //6.2、更新医院设置
  updateHosp(hospitalSet){
    return request({
      url:`/admin/hosp/hospitalSet/updateHosp`,
      method:'post',
      data:hospitalSet
    })
  }
}
